package com.ruoyi.homework.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.homework.mapper.TechHomeworkMapper;
import com.ruoyi.homework.domain.TechHomework;
import com.ruoyi.homework.service.ITechHomeworkService;

/**
 * 作业Service业务层处理
 * 
 * @author admin
 * @date 2022-08-06
 */
@Service
public class TechHomeworkServiceImpl implements ITechHomeworkService 
{
    @Autowired
    private TechHomeworkMapper techHomeworkMapper;

    /**
     * 查询作业
     * 
     * @param hwId 作业主键
     * @return 作业
     */
    @Override
    public TechHomework selectTechHomeworkByHwId(Long hwId)
    {
        return techHomeworkMapper.selectTechHomeworkByHwId(hwId);
    }

    /**
     * 查询作业列表
     * 
     * @param techHomework 作业
     * @return 作业
     */
    @Override
    public List<TechHomework> selectTechHomeworkList(TechHomework techHomework)
    {
        return techHomeworkMapper.selectTechHomeworkList(techHomework);
    }

    /**
     * 新增作业
     * 
     * @param techHomework 作业
     * @return 结果
     */
    @Override
    public int insertTechHomework(TechHomework techHomework)
    {
        return techHomeworkMapper.insertTechHomework(techHomework);
    }

    /**
     * 修改作业
     * 
     * @param techHomework 作业
     * @return 结果
     */
    @Override
    public int updateTechHomework(TechHomework techHomework)
    {
        return techHomeworkMapper.updateTechHomework(techHomework);
    }

    /**
     * 批量删除作业
     * 
     * @param hwIds 需要删除的作业主键
     * @return 结果
     */
    @Override
    public int deleteTechHomeworkByHwIds(Long[] hwIds)
    {
        return techHomeworkMapper.deleteTechHomeworkByHwIds(hwIds);
    }

    /**
     * 删除作业信息
     * 
     * @param hwId 作业主键
     * @return 结果
     */
    @Override
    public int deleteTechHomeworkByHwId(Long hwId)
    {
        return techHomeworkMapper.deleteTechHomeworkByHwId(hwId);
    }
}
